import ParentView from 'views/Layout/ParentView'
const admin = [
  {
    path: 'index',
    meta: {name: '首页'},
    component: () => import('views/Index/Index')
  },
  {
    path: 'admin',
    redirect: 'admin/list',
    component: ParentView,
    meta: {name: '管理员'},
    children: [
      {
        path: 'list',
        meta: {name: '列表'},
        component: () => import('views/Admin/List')
      },
      {
        path: 'create',
        meta: {name: '创建文章'},
        component: () => import('views/Article/CreateOrEdit')
      }
    ]
  },
  {
    path: 'article',
    redirect: 'article/list',
    component: ParentView,
    meta: {name: '文章'},
    children: [
      {
        path: 'list',
        meta: {name: '文章列表'},
        component: () => import('views/Article/List')
      },
      {
        path: 'edit/:id',
        meta: {name: '创建文章'},
        component: () => import('views/Article/CreateOrEdit')
      }
      // {
      //   path: 'edit/:article_tid',
      //   meta: {name: '编辑文章'},
      //   component: () => import('views/Article/CreateOrEdit')
      // }
    ]
  },
  {
    path: 'article_category',
    redirect: 'article_category/list',
    component: ParentView,
    meta: {name: '文章分类'},
    children: [
      {
        path: 'list',
        meta: {name: '文章分类列表'},
        component: () => import('views/ArticleCategory/List')
      }
      // {
      //   path: 'create',
      //   meta: {name: '创建文章分类'},
      //   component: () => import('views/ArticleCategory/CreateOrEdit')
      // },
      // {
      //   path: 'edit',
      //   meta: {name: '编辑文章分类'},
      //   component: () => import('views/ArticleCategory/CreateOrEdit')
      // }
    ]
  },
  {
    path: 'about',
    redirect: 'about/me',
    component: ParentView,
    meta: {name: '关于'},
    children: [
      {
        path: 'me',
        meta: {name: '呱呱二号'},
        component: () => import('views/About/Me')
      }
    ]
  }
]

export default admin
